package com.hotmocha.jclient.model;

import com.hotmocha.jclient.comm.R;

import java.util.ArrayList;

public class MemberList implements BaseMessage {
	public int groupid;
	public int cmd;	 /* init:0  add:1 delete:2 */
	public ArrayList<ClientInfo> clientinfo;

	public String toString() {
		String tmp =  "groupid: " + groupid +
			" cmd: " + cmd +
			" nodes: (";

		for (int i = 0; i < clientinfo.size(); i++) {
			tmp += clientinfo.get(i) + "\n";
		}
		tmp += ")";

		return tmp;
	}

	@Override
	public int getMessageType() {
		return R.MSG_TYPE_MEMBER_LIST;
	}
}
